package com.time.workbench.system.controller;

import com.time.workbench.system.entity.bo.SystemDictType;
import com.time.workbench.system.entity.vo.SystemDictTypeVO;
import com.time.workbench.system.service.SystemDictService;
import com.time.workbench.system.service.SystemDictTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 字典控制器
 *@description: 字典控制器
 *@menu 字典
 */
@RestController
@RequestMapping("/api/system/dict")
@Slf4j
public class SystemDictController {

    @Autowired
    private SystemDictTypeService systemDictTypeService;

    /**
     * 根据typeCode查询所有值
     * @param typeCode
     * @return
     */
    @GetMapping("/getByTypeCode")
    public SystemDictTypeVO getByTypeCode(String typeCode){
            return systemDictTypeService.getByTypeCode(typeCode);
    }
}
